package com.peiwan.user.service;

import com.peiwan.user.dto.UserDTO;
import com.peiwan.user.dto.UserCreateDTO;
import com.peiwan.user.entity.User;

import java.util.List;

public interface UserService {
    UserDTO register(UserCreateDTO userCreateDTO);
    UserDTO login(String username, String password);
    UserDTO getCurrentUser();
    UserDTO updateProfile(UserDTO userDTO);
    List<UserDTO> getAllUsers(); // 仅管理员可用
    UserDTO getUserByUsername(String username); // 仅管理员可用
    boolean existsByUsername(String username);
    boolean existsByEmail(String email);
    boolean existsByPhone(String phone);
    void deleteUser(String username);
    void updateUserPermission(String username, String permission);
    String getUserPermission(String username);
    boolean hasPermission(String username, String permission);
    UserDTO updateUser(String username, UserDTO userDTO);
}